<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>FlowLine - GPU管理系统</title>
    <link rel="stylesheet" href="../css/type.css">
    <link rel="stylesheet" href="gpu.css">
</head>
<body>
    <nav class="navbar">
        <a href="/"><div class="logo">FlowLine</div></a>
        <div class="nav-items">
            <a href="/gpu"><div class="nav-item active">GPU</div></a>
            <a href="/tasks"><div class="nav-item">任务</div></a>
            <a href="/logs"><div class="nav-item">日志</div></a>
            <a href="/settings"><div class="nav-item">设置</div></a>
        </div>
        <div class="user-info">
            <span>Admin</span>
        </div>
    </nav>
    
    <div class="toast-container" id="toastContainer"></div>

    <div class="container">
        <div class="sidebar">
            <div class="section-header">
                <h2>GPU 列表</h2>
                <div class="header-actions">
                    <button id="runBtn">运行</button>
                    <button id="refreshBtn">刷新</button>
                </div>
            </div>
            <div id="gpuList" class="gpu-list">
                <!-- GPU卡片将通过JavaScript渲染 -->
            </div>
        </div>
        
        <div class="content">
            <div class="gpu-details">
                <div class="section-header">
                    <h2 id="gpuDetailsTitle">GPU 详情</h2>
                </div>
                <div id="gpuDetailsInfo" class="details-info">
                    <!-- GPU详情将通过JavaScript渲染 -->
                </div>
            </div>
            
            <div class="gpu-tasks">
                <div class="section-header">
                    <h2 id="tasksTitle">活跃任务</h2>
                </div>
                <div id="gpuTasks" class="tasks-list">
                    <!-- 任务列表将通过JavaScript渲染 -->
                </div>
            </div>
            
            <div class="processes">
                <div class="section-header">
                    <h2>所有进程</h2>
                    <div class="header-actions">
                        <button id="clearBtn">清空完成/失败</button>
                    </div>
                </div>
                <div class="table-container">
                    <table id="processesTable">
                        <thead>
                            <tr>
                                <th>进程</th>
                                <th>状态</th>
                                <th>PID</th>
                                <th>任务</th>
                                <th>GPU</th>
                                <th>用户</th>
                                <th>开始时间</th>
                                <th>运行时间</th>
                                <th>命令</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!-- 进程数据将通过JavaScript渲染 -->
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    
    <script src="../js/type.js"></script>
    <script src="script.js"></script>
</body>
</html> 